#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>

using namespace std;

int main()
{
	vector<int> v;


	v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);

	vector<int>::iterator it = find(v.begin(), v.end(), 3);

	v.insert(it, 5);
	v.erase(find(v.begin(),v.end(),3));

	for (size_t i = 0; i < v.size(); i++)
	{
		cout << v[i] << " ";
	}

	/*v.push_back(1);
	v.push_back(2);
	v.push_back(3);
	v.push_back(4);*/

	//vector<int> v1(10, 1);


	//vector<int> v2(v1.begin(), v1.end());

	///*for (size_t i = 0; i < v2.size(); i++)
	//{
	//	cout << v2[i] << " ";
	//}*/

	//v2.insert(v2.begin(), 2);
	//v2.insert(v2.end(), 3);

	//for (size_t i = 0; i < v2.size(); i++)
	//{
	//	cout << v2[i] << " ";
	//}


	//for (size_t i = 0; i < v1.size(); i++)
	//{
	//	cout << v1[i] << " ";
	//}

	//cout << endl;

	//vector<int>::iterator it = v1.begin();
	//while (it != v1.end())
	//{
	//	cout << *it << " ";
	//	it++;
	//}
	//cout << endl;
	////int n = 0;
	//for (auto n : v1)
	//{
	//	cout << n << " ";
	//}
	return 0;
}